package com.steve.mac.tools.java8test;

import java.util.Arrays;
import java.util.List;
import java.util.function.Supplier;

/**
 * designed by Steve Ke on 2017/12/9.
 *
 * @author Steve Ke
 *         e-mail  huangke7296@foxmail.com
 *         github  https://github.com/KoreHuang
 *         oschina https://git.oschina.net/steveKe
 * @version JDK 1.8.0_111
 * @since 2017/12/9
 */
public interface Defaulable {

    default String notRequire(){
        test();

        Arrays.asList("a","b","c","d").forEach(System.out::println);
        List samp=Arrays.asList("a","b","c","d");
        return samp.parallelStream().map(str->str+" hello,world").reduce((a,e)->a+"--"+e).toString();
    }

    public String test();

    static Defaulable createNewInstance(Supplier<Defaulable> supplier){
        return supplier.get();
    }


}
